<template>
  <div class="map">
    <el-bmap
      ref="mapRef"
      mapType="B_EARTH_MAP"
      :center="center"
      :zoom="zoom"
      @init="init"
      @zoomend="zoomend"
    >
    </el-bmap>
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from "vue";

const zoom = ref(0.1);
const center = ref([121.59996, 31.197646]);
const mapRef = ref();

const init = (e: any) => {
  console.info(e);
};

const zoomend = (e: any) => {
  console.info(e);
};

onMounted(() => {
  getMap();
});

const getMap = () => {
  setTimeout(() => {
    console.log("$refs: ", mapRef.value.$$getInstance());
  }, 5000);
};
</script>
<style lang="less">
.anchorBL {
  display: none !important;
}
.BMap_cpyCtrl {
  display: none !important;
}
.map {
  width: 100%;
  height: 500px;
}
</style>
